/*
 * @Author: jianglijun 
 * @Date: 2019-04-20 21:29:31 
 * @Last Modified by:   jianglijun 
 * @Last Modified time: 2019-04-20 21:29:31 
 */
const router = require("koa-router")();
router.get("/", async (ctx,next) => {
    ctx.body = "商品----------列表"
})
router.get("/add", async (ctx,next) => {
    if(ctx.session.username){
        ctx.body = {
            errno:0,
            msg:"成功"
        }  
    }else{
        ctx.body = {
            errno:1000,
            msg:"没有"
        }  
    }
})
router.get("/edit", async (ctx,next) => {
    ctx.session.username = "张三";
    ctx.body = {
        errno:0,
        msg:"成功",
        data:ctx.session.username
    }
})
router.get("/del", async (ctx,next) => {
    ctx.body = "商品----------删除"
})
module.exports = router;